<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<!--  基本资料  -->
    <el-row :gutter="10">
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="客户" prop="ESAA001">
                <el-input v-model="form.ESAA001_NAME" disabled="true"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="提单人员" prop="ESAA002">
                <el-input v-model="form.ESAA002" :disabled="form.ESAASTUS != '1'?true:false "></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="问题类型" prop="ESAA003">
                <el-select v-model="form.ESAA003" clearable :disabled="form.ESAASTUS != '1'">
                    <el-option v-for="item in selectOptions.esaa003Options" :label="item.value" :value="item.code" ></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="提单日期" prop="ESAA004">
                <el-date-picker
                        :disabled="true"
                        type="date"
                        v-model="form.ESAA004"
                        value-format="yyyy-MM-dd"
                        style="width: 100%">
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="产品线" prop="ESAA005">
                <el-input v-model="form.ESAA005_NAME">
                    <i class="el-icon-search el-input__icon" @click="openEsaa005" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="ERP产品线" prop="ESAA006">
                <el-select v-model="form.ESAA006" clearable :disabled="form.ESAASTUS != '1'">
                    <el-option v-for="item in selectOptions.esaa006Options" :label="item.value" :value="item.code" ></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="作业名称" prop="ESAA007">
                <el-input v-model="form.ESAA007" :disabled="form.ESAASTUS != '1'"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <el-form-item label="问题描述" prop="ESAA008">
                <el-input type="textarea" v-model="form.ESAA008" :disabled="form.ESAASTUS != '1'"></el-input>
            </el-form-item>
        </el-col>

    </el-row>

<!--  文件上传  -->
    <el-row>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="文件链接" class="c-upload-text">
                <el-input v-model="form.ESAA012" v-show="false"></el-input>
                <el-upload
                        style="width: 90%"
                        class="upload-demo"
                        ref="upload2"
                        v-model="form.ESAA012"
                        :action="files"
                        :file-list="fileList"
                        list-type="text"
                        :limit="1"
                        :on-exceed="handleFileExceed"
                        :on-preview="handleFilePreview"
                        :before-upload="beforeUploadFiles"
                        :on-remove="handleFileRemove"
                        :on-success="successUploadFiles"
                        :auto-upload="false">
                    <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
                </el-upload>
            </el-form-item>
        </el-col>
    </el-row>

<!--  视频上传  -->
    <el-row>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="视频上传" class="c-upload-text">
                <!-- action必选参数, 上传的地址 -->
                <!--:on-progress="uploadVideoProcess"-->
                <el-input v-model="form.ESAA014" v-show="false" style="width: 0;"></el-input>
                <el-upload class="avatar-uploader el-upload--text"
                           style="width: 90%"
                           ref="upload3"
                           v-model="form.ESAA014"
                           :action="videoUrl"
                           :file-list="videoList"
                           :show-file-list="true"
                           :on-preview="handleFilePreview"
                           :on-remove="handleVideoRemove"
                           :on-success="handleVideoSuccess"
                           :before-upload="beforeUploadVideo"
                           :auto-upload="false"
                           limit="1">
                    <el-button slot="trigger" size="small" type="primary">选取视频文件</el-button>
                </el-upload>
            </el-form-item>
        </el-col>
    </el-row>

<!--  问题截图  -->
    <el-row :gutter="10">
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <el-form-item label="问题截图" class="c-upload-text" style="float: left;margin-left:0px;">
                <el-upload
                        v-if="!detailReadonly"
                           class="upload-demo"
                           ref="upload1"
                           v-model="form.ESAA009"
                           :file-list="imgList"
                           :action="imgs"
                           list-type="picture-card"
                           :file-list="imgList"
                           :before-upload="beforeUploadImg"
                           :on-preview="handleImgPreview"
                           :on-remove="handleJpgRemove"
                           :on-success="successUploadImg"
                           :before-upload="beforeUploadImg"
                           :auto-upload="false" multiple>
                    <i class="el-icon-plus"></i>
                </el-upload>
                <el-dialog :visible.sync="dialogVisible" :modal-append-to-body="false">
                    <img width="100%" :src="dialogImageUrl" alt="">
                </el-dialog>
            </el-form-item>
        </el-col>

        <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
            <template v-if="detailReadonly && imgList.length!=0">
                <el-carousel id="ESAA009_IMGS" :autoplay="false"  height="150px" indicator-position="outside">
                    <el-carousel-item v-for="item in imgList" :key="item" style="text-align: center">
                        <img :src="item.url" style="height: 100%" @click="bigShow(item.url)">
                    </el-carousel-item>
                </el-carousel>
            </template>
        </el-col>
    </el-row>
<!--    <div id="imgFull" style="position: fixed;left: 0;right: 0;top: 0;bottom: 0;z-index: 999;background: rgba(0,0,0,.5);display: none">-->
<!--        <div class="imgFull_btn" style="margin: 10px">-->
<!--            <el-button icon="icon iconfont icon-23" type="primary" size="mini" @click="tranform1">右旋转90度</el-button>-->
<!--            <el-button icon="icon iconfont icon-23" type="primary" size="mini" @click="tranform2">左旋转90度</el-button>-->
<!--            <el-button icon="icon iconfont icon-23" type="primary" size="mini" @click="close">关闭</el-button>-->
<!--        </div>-->
<!--        <div id="imgFull_box" style="margin: 20px"></div>-->
<!--    </div>-->

<!--  处理人员/说明  -->
    <el-row :gutter="10" style="margin-top: 20px">
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="处理人员" prop="ESAA010">
                <el-input v-model="form.ESAA010_NAME" disabled="true">
                    <i class="el-icon-search el-input__icon" @click="openEsaa010" slot="suffix" v-show="form.ESAASTUS == '2' && userType != '1'"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <el-form-item label="处理说明" prop="ESAA011">
                <el-input type="textarea" v-model="form.ESAA011" :disabled="form.ESAASTUS != '2' || userType == '1'"></el-input>
            </el-form-item>
        </el-col>
    </el-row>

<!--  退回说明  -->
    <el-row :gutter="10" style="margin-top: 20px">
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <el-form-item label="退回说明" prop="ESAA013">
                <el-input type="textarea" v-model="form.ESAA013" :disabled="form.ESAASTUS != '3'"></el-input>
            </el-form-item>
        </el-col>
    </el-row>

</el-form>
<el-form>
    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="text-align: right">
        <el-button icon="icon iconfont icon-23" size="mini" @click="cancel">关闭</el-button>
        <el-button type="warning" icon="icon iconfont icon-21" size="mini" @click="sure" :disabled="detailReadonly">保存</el-button>
    </el-col>
</el-form>
<script>
    require(["pc/crm/esai100_edit"], $.noop);
</script>